Optimal. Leaf size=267 \[ -\frac {i \text {ArcTan}\left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{8 \sqrt {2} a^3 d}+\frac {i \text {ArcTan}\left (1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{8 \sqrt {2} a^3 d}+\frac {\cot ^{\frac {3}{2}}(c+d x)}{6 d (i a+a \cot (c+d x))^3}+\frac {\sqrt {\cot (c+d x)}}{4 a d (i a+a \cot (c+d x))^2}+\frac {i \sqrt {\cot (c+d x)}}{4 d \left (i a^3+a^3 \cot (c+d x)\right )}+\frac {i \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{16 \sqrt {2} a^3 d}-\frac {i \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{16 \sqrt {2} a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.31, antiderivative size = 267, normalized size of antiderivative = 1.00, number of steps
used = 16, number of rules used = 13, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3754, 3639,
3676, 3677, 12, 3557, 335, 303, 1176, 631, 210, 1179, 642} \begin {gather*} -\frac {i \text {ArcTan}\left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{8 \sqrt {2} a^3 d}+\frac {i \text {ArcTan}\left (\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{8 \sqrt {2} a^3 d}+\frac {i \sqrt {\cot (c+d x)}}{4 d \left (a^3 \cot (c+d x)+i a^3\right )}+\frac {i \log \left (\cot (c+d x)-\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{16 \sqrt {2} a^3 d}-\frac {i \log \left (\cot (c+d x)+\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{16 \sqrt {2} a^3 d}+\frac {\cot ^{\frac {3}{2}}(c+d x)}{6 d (a \cot (c+d x)+i a)^3}+\frac {\sqrt {\cot (c+d x)}}{4 a d (a \cot (c+d x)+i a)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 210
Rule 303
Rule 335
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 3557
Rule 3639
Rule 3676
Rule 3677
Rule 3754
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {\cot (c+d x)} (a+i a \tan (c+d x))^3} \, dx &=\int \frac {\cot ^{\frac {5}{2}}(c+d x)}{(i a+a \cot (c+d x))^3} \, dx\\ &=\frac {\cot ^{\frac {3}{2}}(c+d x)}{6 d (i a+a \cot (c+d x))^3}+\frac {\int \frac {\sqrt {\cot (c+d x)} \left (-\frac {3 i a}{2}+\frac {9}{2} a \cot (c+d x)\right )}{(i a+a \cot (c+d x))^2} \, dx}{6 a^2}\\ &=\frac {\cot ^{\frac {3}{2}}(c+d x)}{6 d (i a+a \cot (c+d x))^3}+\frac {\sqrt {\cot (c+d x)}}{4 a d (i a+a \cot (c+d x))^2}+\frac {\int \frac {-3 i a^2+9 a^2 \cot (c+d x)}{\sqrt {\cot (c+d x)} (i a+a \cot (c+d x))} \, dx}{24 a^4}\\ &=\frac {\cot ^{\frac {3}{2}}(c+d x)}{6 d (i a+a \cot (c+d x))^3}+\frac {\sqrt {\cot (c+d x)}}{4 a d (i a+a \cot (c+d x))^2}+\frac {i \sqrt {\cot (c+d x)}}{4 d \left (i a^3+a^3 \cot (c+d x)\right )}+\frac {\int -6 i a^3 \sqrt {\cot (c+d x)} \, dx}{48 a^6}\\ &=\frac {\cot ^{\frac {3}{2}}(c+d x)}{6 d (i a+a \cot (c+d x))^3}+\frac {\sqrt {\cot (c+d x)}}{4 a d (i a+a \cot (c+d x))^2}+\frac {i \sqrt {\cot (c+d x)}}{4 d \left (i a^3+a^3 \cot (c+d x)\right )}-\frac {i \int \sqrt {\cot (c+d x)} \, dx}{8 a^3}\\ &=\frac {\cot ^{\frac {3}{2}}(c+d x)}{6 d (i a+a \cot (c+d x))^3}+\frac {\sqrt {\cot (c+d x)}}{4 a d (i a+a \cot (c+d x))^2}+\frac {i \sqrt {\cot (c+d x)}}{4 d \left (i a^3+a^3 \cot (c+d x)\right )}+\frac {i \text {Subst}\left (\int \frac {\sqrt {x}}{1+x^2} \, dx,x,\cot (c+d x)\right )}{8 a^3 d}\\ &=\frac {\cot ^{\frac {3}{2}}(c+d x)}{6 d (i a+a \cot (c+d x))^3}+\frac {\sqrt {\cot (c+d x)}}{4 a d (i a+a \cot (c+d x))^2}+\frac {i \sqrt {\cot (c+d x)}}{4 d \left (i a^3+a^3 \cot (c+d x)\right )}+\frac {i \text {Subst}\left (\int \frac {x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{4 a^3 d}\\ &=\frac {\cot ^{\frac {3}{2}}(c+d x)}{6 d (i a+a \cot (c+d x))^3}+\frac {\sqrt {\cot (c+d x)}}{4 a d (i a+a \cot (c+d x))^2}+\frac {i \sqrt {\cot (c+d x)}}{4 d \left (i a^3+a^3 \cot (c+d x)\right )}-\frac {i \text {Subst}\left (\int \frac {1-x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{8 a^3 d}+\frac {i \text {Subst}\left (\int \frac {1+x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{8 a^3 d}\\ &=\frac {\cot ^{\frac {3}{2}}(c+d x)}{6 d (i a+a \cot (c+d x))^3}+\frac {\sqrt {\cot (c+d x)}}{4 a d (i a+a \cot (c+d x))^2}+\frac {i \sqrt {\cot (c+d x)}}{4 d \left (i a^3+a^3 \cot (c+d x)\right )}+\frac {i \text {Subst}\left (\int \frac {1}{1-\sqrt {2} x+x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{16 a^3 d}+\frac {i \text {Subst}\left (\int \frac {1}{1+\sqrt {2} x+x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{16 a^3 d}+\frac {i \text {Subst}\left (\int \frac {\sqrt {2}+2 x}{-1-\sqrt {2} x-x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{16 \sqrt {2} a^3 d}+\frac {i \text {Subst}\left (\int \frac {\sqrt {2}-2 x}{-1+\sqrt {2} x-x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{16 \sqrt {2} a^3 d}\\ &=\frac {\cot ^{\frac {3}{2}}(c+d x)}{6 d (i a+a \cot (c+d x))^3}+\frac {\sqrt {\cot (c+d x)}}{4 a d (i a+a \cot (c+d x))^2}+\frac {i \sqrt {\cot (c+d x)}}{4 d \left (i a^3+a^3 \cot (c+d x)\right )}+\frac {i \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{16 \sqrt {2} a^3 d}-\frac {i \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{16 \sqrt {2} a^3 d}+\frac {i \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{8 \sqrt {2} a^3 d}-\frac {i \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{8 \sqrt {2} a^3 d}\\ &=-\frac {i \tan ^{-1}\left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{8 \sqrt {2} a^3 d}+\frac {i \tan ^{-1}\left (1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{8 \sqrt {2} a^3 d}+\frac {\cot ^{\frac {3}{2}}(c+d x)}{6 d (i a+a \cot (c+d x))^3}+\frac {\sqrt {\cot (c+d x)}}{4 a d (i a+a \cot (c+d x))^2}+\frac {i \sqrt {\cot (c+d x)}}{4 d \left (i a^3+a^3 \cot (c+d x)\right )}+\frac {i \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{16 \sqrt {2} a^3 d}-\frac {i \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{16 \sqrt {2} a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.03, size = 231, normalized size = 0.87 \begin {gather*} \frac {\sqrt {\cot (c+d x)} \csc ^3(c+d x) \sec (c+d x) \left (-1+\cos (4 (c+d x))-6 i \cos (3 (c+d x)) \log \left (\cos (c+d x)+\sin (c+d x)+\sqrt {\sin (2 (c+d x))}\right ) \sqrt {\sin (2 (c+d x))}+6 i \sin (2 (c+d x))+6 i \text {ArcSin}(\cos (c+d x)-\sin (c+d x)) \sqrt {\sin (2 (c+d x))} (\cos (3 (c+d x))+i \sin (3 (c+d x)))+6 \log \left (\cos (c+d x)+\sin (c+d x)+\sqrt {\sin (2 (c+d x))}\right ) \sqrt {\sin (2 (c+d x))} \sin (3 (c+d x))+3 i \sin (4 (c+d x))\right )}{96 a^3 d (i+\cot (c+d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 14.03, size = 9445, normalized size = 35.37
method | result | size |
default | \(\text {Expression too large to display}\) | \(9445\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 518 vs. \(2 (206) = 412\).
time = 1.26, size = 518, normalized size = 1.94 \begin {gather*} -\frac {{\left (12 \, a^{3} d \sqrt {\frac {i}{64 \, a^{6} d^{2}}} e^{\left (6 i \, d x + 6 i \, c\right )} \log \left (2 \, {\left (8 \, {\left (a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} - a^{3} d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} \sqrt {\frac {i}{64 \, a^{6} d^{2}}} + i \, e^{\left (2 i \, d x + 2 i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}\right ) - 12 \, a^{3} d \sqrt {\frac {i}{64 \, a^{6} d^{2}}} e^{\left (6 i \, d x + 6 i \, c\right )} \log \left (-2 \, {\left (8 \, {\left (a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} - a^{3} d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} \sqrt {\frac {i}{64 \, a^{6} d^{2}}} - i \, e^{\left (2 i \, d x + 2 i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}\right ) - 12 \, a^{3} d \sqrt {-\frac {i}{64 \, a^{6} d^{2}}} e^{\left (6 i \, d x + 6 i \, c\right )} \log \left (\frac {{\left (8 \, {\left (a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} - a^{3} d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} \sqrt {-\frac {i}{64 \, a^{6} d^{2}}} + i\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{8 \, a^{3} d}\right ) + 12 \, a^{3} d \sqrt {-\frac {i}{64 \, a^{6} d^{2}}} e^{\left (6 i \, d x + 6 i \, c\right )} \log \left (-\frac {{\left (8 \, {\left (a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} - a^{3} d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} \sqrt {-\frac {i}{64 \, a^{6} d^{2}}} - i\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{8 \, a^{3} d}\right ) - \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} {\left (2 \, e^{\left (6 i \, d x + 6 i \, c\right )} + e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )}\right )} e^{\left (-6 i \, d x - 6 i \, c\right )}}{48 \, a^{3} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {i \int \frac {1}{\tan ^{3}{\left (c + d x \right )} \sqrt {\cot {\left (c + d x \right )}} - 3 i \tan ^{2}{\left (c + d x \right )} \sqrt {\cot {\left (c + d x \right )}} - 3 \tan {\left (c + d x \right )} \sqrt {\cot {\left (c + d x \right )}} + i \sqrt {\cot {\left (c + d x \right )}}}\, dx}{a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {1}{\sqrt {\mathrm {cot}\left (c+d\,x\right )}\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________